-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Box block, VariantProps fix #162
Conversation
Size Change: +104 B (0%) Total Size: 277 kB
ℹ️ View Unchanged
|
// FIXME[1.0]: remove this alias | ||
export type FlexVariant = FlexProps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FlexVariant
was a typo 😭 so I'm adding FlexProps
and aliasing it to FlexVariant
so that we don't have to release this as a breaking change. The FIXME[1.0]
comment should remind us to remove the alias when we release 1.0.
import React, { Component, ComponentProps, ComponentType } from 'react' | ||
import React, { ComponentProps, ComponentType } from 'react' | ||
|
||
// XXX: export type { VariantProps } from '@stitches/react' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just delete this? also, I think I'm confused on whether the stitches VariantProps
is working or causing issues. but down to merge this and see if it fixes the linting errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, tbh. It doesn't hurt to keep the comment around as a reminder that we could bring back the stitches type if/when it's fixed upstream, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm!
Two things:
display: block
in the default styles for<Box>
, which simplifies<Box as='a'>
or any other element that isn't block-level by default.VariantProps
type with the one from Stitches. Let's see if this improves autocompletion and errors with theas
prop in sfgov-next. 🤞